package com.ailanyin.generate;

import com.ailanyin.generate.config.GenerateConfig;
import com.ailanyin.generate.model.ColumnClass;
import com.ailanyin.generate.model.ModelInfo;
import com.ailanyin.generate.utils.GenerateUtil;
import com.ailanyin.generate.utils.MysqlUtil;
import com.google.common.base.CaseFormat;
import freemarker.cache.ClassTemplateLoader;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;


/**
 * 启动类
 *
 * @author ailanyin
 */
public class Main {

    public static void main(String[] args) {
        GenerateConfig config = new GenerateConfig();
        config.setMysqlUrl("localhost");
        config.setMysqlPort(3306);
        config.setMysqlDatabaseName("generator");
        config.setMysqlAccountName("root");
        config.setMysqlAccountPassword("root");
        config.setChartSet("UTF-8");
        config.setPackageName("com.ailanyin");
        config.setFilePath("D:\\Temp\\");

        GenerateUtil.startGenerate(config);
    }
}
